﻿using DocumentFormat.OpenXml.Lite.Helper;
using DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Style
{
    [XmlRoot("lsdException", Namespace = Constants.WordMain)]
    public class LatentStyleException : XmlSerializable
    {
        /// <summary>
        /// Primary Style Name
        /// </summary>
        [XmlAttribute("name", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public string Name { get; set; }

        /// <summary>
        /// Latent Style Locking Setting
        /// </summary>
        [Optional]
        [XmlAttribute("locked", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Locked { get; set; }

        /// <summary>
        /// Override default sorting order
        /// </summary>
        [Optional]
        [XmlAttribute("uiPriority", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public Nullable<int> UiPriority { get; set; }

        /// <summary>
        /// Semi hidden text override
        /// </summary>
        [Optional]
        [XmlAttribute("semiHidden", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_OnOff> SemiHidden { get; set; }

        /// <summary>
        /// Unhide when used
        /// </summary>
        [Optional]
        [XmlAttribute("unhideWhenUsed", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_OnOff> UnhideWhenUsed { get; set; }

        /// <summary>
        /// Latent Style Primary Style Setting
        /// </summary>
        [Optional]
        [XmlAttribute("qFormat", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_OnOff> QFormat { get; set; }

        public LatentStyleException() { }
    }
}
